版权声明:本文为博主原创文章,转载请注明出处:http://blog.jerkybible.com/2013/11/06/2013-11-06-CODE 111 Valid Parentheses/
Given a string containing just the characters '('
, ')'
, '{'
, '}'
, '['
and ']'
,
determine if the input string is valid.
The brackets must close in the correct order, "()"
and "()[]{}"
are
all valid but "(]"
and "([)]"
are
not.
|
|